package com.handle.system.api.feign;

import com.handle.common.core.constants.ServiceNameConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Set;

/**
 * @author zhangqing
 * @version V1.0
 * @description 菜单远程调用
 * @date 6/3/2021 4:21 PM
 */
@FeignClient(name = ServiceNameConstants.SYSTEM_SERVICE,path = "/menu")
public interface RemoteSystemMenu {

    /**
     * 根据用户ID查询权限
     *
     * @param userId 用户ID
     * @return 权限列表
     */
    @GetMapping("/perms/{userId}")
    Set<String> selectPermsByUserId(@PathVariable("userId") Long userId);
}
